package Exc.domain;


/**
 * The type Query object.
 *
 * @author fengke
 */
public class QueryObject {
    private Integer currentPage = 1;
    private Integer pageSize = 2;

    private Integer startIndex;

    /**
     * Gets current page.
     *
     * @return the current page
     */
    public Integer getCurrentPage() {
        return currentPage;
    }

    /**
     * Sets current page.
     *
     * @param currentPage the current page
     */
    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    /**
     * Gets page size.
     *
     * @return the page size
     */
    public Integer getPageSize() {
        return pageSize;
    }

    /**
     * Sets page size.
     *
     * @param pageSize the page size
     */
    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    /**
     * Gets start index.
     *
     * @return the start index
     */
    public Integer getStartIndex() {
        Integer result = null;
        if (this.currentPage != null && pageSize != null) {
            result = (this.currentPage-1)*this.pageSize;
        }
        return result;
    }

    /**
     * Sets start index.
     *
     * @param startIndex the start index
     */
    public void setStartIndex(Integer startIndex) {
        this.startIndex = startIndex;
    }
}
